<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>加油站管理系统登录</title>
    <style>
        /* 全局样式设置 */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: "微软雅黑", sans-serif;
        }

        /* 页面背景设置 */
        body {
            background: url("/images/2.jpg") no-repeat center center fixed;
            background-size: cover;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
        }

        /* 登录容器样式 */
        .login-container {
            width: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        /* 登录框主体样式 */
        .login-box {
            width: 390px;
            background-color: rgba(255, 255, 255, 0.1);
            border-radius: 8px;
            box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
            overflow: hidden;
            backdrop-filter: blur(5px);
        }

        /* 标题栏样式 - 修改为红色半透明 */
        .title {
            background-color: rgba(255, 0, 0, 0.5); /* 红色半透明 */
            color: #fff;
            padding: 15px;
            text-align: center;
            font-size: 20px;
            font-weight: bold;
        }

        /* 表单区域样式 */
        .login-box form {
            padding: 25px;
        }

        /* 标签样式 */
        .login-box form label {
            display: block;
            margin: 12px 0 6px;
            font-weight: bold;
            color: #0e0e0e;
        }

        /* 输入框样式 */
        .login-box form input[type="text"],
        .login-box form input[type="password"] {
            width: 100%;
            padding: 10px;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-size: 14px;
            transition: border-color 0.3s;
            background-color: rgba(255, 255, 255, 0.8);
        }

        .login-box form input[type="text"]:focus,
        .login-box form input[type="password"]:focus {
            border-color: #d6dde5;
            outline: none;
            background-color: #fff;
        }

        /* 单选框组样式 - 修改为同一行 */
        .radio-group {
            margin: 15px 0;
            display: flex;
            justify-content: space-around;
        }

        .radio-group label {
            display: flex;
            align-items: center;
            font-weight: normal;
            cursor: pointer;
            color: #333;
        }

        .radio-group input[type="radio"] {
            margin-right: 5px;
        }

        /* 提交按钮样式 - 修改为红色背景白色字体 */
        .login-box form input[type="submit"] {
            width: 100%;
            padding: 12px;
            background-color: rgba(255, 0, 0, 0.7); /* 红色半透明 */
            color: #fff;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 16px;
            font-weight: bold;
            margin-top: 10px;
            transition: background-color 0.3s;
        }

        .login-box form input[type="submit"]:hover {
            background-color: rgba(200, 0, 0, 0.8); /* 悬停时红色加深 */
        }

        /* 注册链接样式 */
        .register-link {
            text-align: center;
            margin-top: 15px;
            color: #0e0e0e;
        }

        .register-link a {
            color: #1773d0;
            text-decoration: none;
            font-weight: bold;
        }

        .register-link a:hover {
            text-decoration: underline;
            color: #0d4b87;
        }
    </style>
</head>

<body>
<div class="login-container">
    <div class="login-box">
        <div class="title">加油站管理系统登录</div>
        <form action="/user/login" method="post">
            <label for="username">用户名：</label>
            <input type="text" id="username" name="username" value="admin" required>

            <label for="password">密码：</label>
            <input type="password" id="password" name="password" required>

            <!-- 错误信息显示 -->
            <div th:if="${msg}" style="color: red; margin: 10px 0; text-align: center;" th:text="${msg}"></div>

            <div class="radio-group">

            </div>

            <input type="submit" value="登录">

            <!-- 注册链接 -->
            <div class="register-link">
                没有账号？<a href="Register.html">注册一个→</a>
            </div>
        </form>
    </div>
</div>
</body>

</html>
